package com.matrix.java.chap_05.example;

import java.util.Scanner;

public class Case5_14 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("input: ");
        String palindrome = input.next();
        int length = palindrome.length();
        boolean isPalind = true;
        for (int i = 0; i < length / 2; i++) {
            if (!palindrome.substring(i, i + 1)
                    .equals(palindrome.substring(palindrome.length() - i - 1, palindrome.length() - i))) {
                isPalind = false;
                break;
            }
        }
        if (isPalind) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        input.close();
    }
}
